<template>
 <div>
 <van-swipe class="my-swipe" :autoplay="1000" indicator-color="white">
  <van-swipe-item v-for="item in swipeArr" :key='item.id' >
      <img :src=item.image_url alt="">
  </van-swipe-item>
</van-swipe>
 </div>
</template>

<script>

import {homelist} from '@/api/HomeApi'
 export default {
  name:'',
    data () {
       return {
           swipeArr:[],//轮播图数据
     };
  },
mounted(){
    homelist().then(res=>{
        // console.log(res);
        this.swipeArr=res.data.banner
    })
}

 }

</script>
<style scoped lang='less'>
.van-swipe-item{
    img{
        width: 100%;
        height: auto;
    }
}
</style>